Optimal. Leaf size=194 \[ \frac {2 (3 A b+3 a B+5 b C) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 (5 a A+7 b B+7 a C) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{21 d}+\frac {2 a A \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {2 (A b+a B) \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 (5 a A+7 b B+7 a C) \sin (c+d x)}{21 d \sqrt {\sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.18, antiderivative size = 194, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4159, 4132,
3854, 3856, 2720, 4130, 2719} \begin {gather*} \frac {2 \sin (c+d x) (5 a A+7 a C+7 b B)}{21 d \sqrt {\sec (c+d x)}}+\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) (5 a A+7 a C+7 b B)}{21 d}+\frac {2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) (3 a B+3 A b+5 b C)}{5 d}+\frac {2 (a B+A b) \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 a A \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 3854
Rule 3856
Rule 4130
Rule 4132
Rule 4159
Rubi steps
\begin {align*} \int \frac {(a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sec ^{\frac {7}{2}}(c+d x)} \, dx &=\frac {2 a A \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)}-\frac {2}{7} \int \frac {-\frac {7}{2} (A b+a B)-\frac {1}{2} (5 a A+7 b B+7 a C) \sec (c+d x)-\frac {7}{2} b C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 a A \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)}-\frac {2}{7} \int \frac {-\frac {7}{2} (A b+a B)-\frac {7}{2} b C \sec ^2(c+d x)}{\sec ^{\frac {5}{2}}(c+d x)} \, dx-\frac {1}{7} (-5 a A-7 b B-7 a C) \int \frac {1}{\sec ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 a A \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {2 (A b+a B) \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 (5 a A+7 b B+7 a C) \sin (c+d x)}{21 d \sqrt {\sec (c+d x)}}-\frac {1}{21} (-5 a A-7 b B-7 a C) \int \sqrt {\sec (c+d x)} \, dx-\frac {1}{5} (-3 A b-3 a B-5 b C) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 a A \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {2 (A b+a B) \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 (5 a A+7 b B+7 a C) \sin (c+d x)}{21 d \sqrt {\sec (c+d x)}}-\frac {1}{21} \left ((-5 a A-7 b B-7 a C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx-\frac {1}{5} \left ((-3 A b-3 a B-5 b C) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=\frac {2 (3 A b+3 a B+5 b C) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 (5 a A+7 b B+7 a C) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{21 d}+\frac {2 a A \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {2 (A b+a B) \sin (c+d x)}{5 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 (5 a A+7 b B+7 a C) \sin (c+d x)}{21 d \sqrt {\sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in
optimal.
time = 3.68, size = 219, normalized size = 1.13 \begin {gather*} \frac {e^{-i d x} \sqrt {\sec (c+d x)} (\cos (d x)+i \sin (d x)) \left (40 (5 a A+7 b B+7 a C) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )-56 i (3 A b+3 a B+5 b C) e^{i (c+d x)} \sqrt {1+e^{2 i (c+d x)}} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i (c+d x)}\right )+2 \cos (c+d x) (84 i (3 A b+3 a B+5 b C)+5 (23 a A+28 b B+28 a C) \sin (c+d x)+42 (A b+a B) \sin (2 (c+d x))+15 a A \sin (3 (c+d x)))\right )}{420 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(514\) vs.
\(2(222)=444\).
time = 0.08, size = 515, normalized size = 2.65
method | result | size |
default | \(-\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (240 A \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +\left (-360 a A -168 A b -168 B a \right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (280 a A +168 A b +168 B a +140 b B +140 a C \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-80 a A -42 A b -42 B a -70 b B -70 a C \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+25 a A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-63 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b +35 b B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-63 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a +35 a C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-105 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b \right )}{105 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) | \(515\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.82, size = 232, normalized size = 1.20 \begin {gather*} -\frac {5 \, \sqrt {2} {\left (i \, {\left (5 \, A + 7 \, C\right )} a + 7 i \, B b\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 \, \sqrt {2} {\left (-i \, {\left (5 \, A + 7 \, C\right )} a - 7 i \, B b\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 21 \, \sqrt {2} {\left (-3 i \, B a - i \, {\left (3 \, A + 5 \, C\right )} b\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 21 \, \sqrt {2} {\left (3 i \, B a + i \, {\left (3 \, A + 5 \, C\right )} b\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - \frac {2 \, {\left (15 \, A a \cos \left (d x + c\right )^{3} + 21 \, {\left (B a + A b\right )} \cos \left (d x + c\right )^{2} + 5 \, {\left ({\left (5 \, A + 7 \, C\right )} a + 7 \, B b\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{105 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \sec {\left (c + d x \right )}\right ) \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right )}{\sec ^{\frac {7}{2}}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{7/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________